﻿using System;

namespace WebAPI.Entities;

public class User
{
    private string id;
    private string ip;
    private string username;
    private string password;
    private string avatar;
    private string phone_number;
    private string email;
    private string create_time;
    private string update_time;

    public User()
    {
    }

    public User(string id, string ip, string username, string password, string avatar, string phoneNumber, string email, string createTime, string updateTime)
    {
        this.id = id;
        this.ip = ip;
        this.username = username;
        this.password = password;
        this.avatar = avatar;
        phone_number = phoneNumber;
        this.email = email;
        create_time = createTime;
        update_time = updateTime;
    }

    public string Id
    {
        get => id;
        set => id = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string Ip
    {
        get => ip;
        set => ip = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string Username
    {
        get => username;
        set => username = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string Password
    {
        get => password;
        set => password = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string Avatar
    {
        get => avatar;
        set => avatar = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string PhoneNumber
    {
        get => phone_number;
        set => phone_number = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string Email
    {
        get => email;
        set => email = value ?? throw new ArgumentNullException(nameof(value));
    }

    public string CreateTime
    {
        get => create_time;
        set => create_time = value;
    }

    public string UpdateTime
    {
        get => update_time;
        set => update_time = value;
    }
}